//
//  IconView.m
//  MyTrip
//
//  Created by zhang on 15/8/28.
//  Copyright (c) 2015年 张益. All rights reserved.
//

#import "IconView.h"
#import "DKNightVersion.h"

@implementation IconView

- (void)dealloc
{
    [_iconLabel release];
    [_icon release];
    [super dealloc];
}


- (instancetype) initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [DKNightVersionManager addClassToSet:self.class];
        self.nightBackgroundColor = UIColorFromRGB(0x343434);
        self.icon = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.width)] autorelease];
        [self addSubview:_icon];
        
        
        self.iconLabel = [[[UILabel alloc] initWithFrame:CGRectMake(0, frame.size.width, frame.size.width, 30)] autorelease];
        [self addSubview:_iconLabel];
        
    }
    return self;
}


- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
    
    [(NSObject *)self.target performSelector:self.action withObject:self];

}



@end
